Integrand size = 16, antiderivative size = 57 \[ \int \frac {x}{a+b \tan \left (c+d x^2\right )} \, dx=\frac {a x^2}{2 \left (a^2+b^2\right )}+\frac {b \log \left (a \cos \left (c+d x^2\right )+b \sin \left (c+d x^2\right )\right )}{2 \left (a^2+b^2\right ) d} \]
Result contains complex when optimal does not.
Time = 0.16 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.44 \[ \int \frac {x}{a+b \tan \left (c+d x^2\right )} \, dx=\frac {(-i a-b) \log \left (i-\tan \left (c+d x^2\right )\right )+i (a+i b) \log \left (i+\tan \left (c+d x^2\right )\right )+2 b \log \left (a+b \tan \left (c+d x^2\right )\right )}{4 \left (a^2+b^2\right ) d} \]
(((-I)*a - b)*Log[I - Tan[c + d*x^2]] + I*(a + I*b)*Log[I + Tan[c + d*x^2] ] + 2*b*Log[a + b*Tan[c + d*x^2]])/(4*(a^2 + b^2)*d)
Time = 0.36 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.96, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {4234, 3042, 3965, 3042, 4013}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x}{a+b \tan \left (c+d x^2\right )} \, dx\) |
\(\Big \downarrow \) 4234 |
\(\displaystyle \frac {1}{2} \int \frac {1}{a+b \tan \left (d x^2+c\right )}dx^2\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {1}{a+b \tan \left (d x^2+c\right )}dx^2\) |
\(\Big \downarrow \) 3965 |
\(\displaystyle \frac {1}{2} \left (\frac {b \int \frac {b-a \tan \left (d x^2+c\right )}{a+b \tan \left (d x^2+c\right )}dx^2}{a^2+b^2}+\frac {a x^2}{a^2+b^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {b \int \frac {b-a \tan \left (d x^2+c\right )}{a+b \tan \left (d x^2+c\right )}dx^2}{a^2+b^2}+\frac {a x^2}{a^2+b^2}\right )\) |
\(\Big \downarrow \) 4013 |
\(\displaystyle \frac {1}{2} \left (\frac {b \log \left (a \cos \left (c+d x^2\right )+b \sin \left (c+d x^2\right )\right )}{d \left (a^2+b^2\right )}+\frac {a x^2}{a^2+b^2}\right )\) |
3.1.15.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[a*(x/(a^ 2 + b^2)), x] + Simp[b/(a^2 + b^2) Int[(b - a*Tan[c + d*x])/(a + b*Tan[c + d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)* (x_)]), x_Symbol] :> Simp[(c/(b*f))*Log[RemoveContent[a*Cos[e + f*x] + b*Si n[e + f*x], x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]
Int[(x_)^(m_.)*((a_.) + (b_.)*Tan[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol ] :> Simp[1/n Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Tan[c + d*x])^ p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 1)/n], 0] && IntegerQ[p]
Time = 0.13 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.96
method | result | size |
parallelrisch | \(\frac {2 a d \,x^{2}+2 b \ln \left (a +b \tan \left (d \,x^{2}+c \right )\right )-b \ln \left (1+\tan ^{2}\left (d \,x^{2}+c \right )\right )}{4 d \left (a^{2}+b^{2}\right )}\) | \(55\) |
derivativedivides | \(\frac {\frac {-\frac {b \ln \left (1+\tan ^{2}\left (d \,x^{2}+c \right )\right )}{2}+a \arctan \left (\tan \left (d \,x^{2}+c \right )\right )}{a^{2}+b^{2}}+\frac {b \ln \left (a +b \tan \left (d \,x^{2}+c \right )\right )}{a^{2}+b^{2}}}{2 d}\) | \(69\) |
default | \(\frac {\frac {-\frac {b \ln \left (1+\tan ^{2}\left (d \,x^{2}+c \right )\right )}{2}+a \arctan \left (\tan \left (d \,x^{2}+c \right )\right )}{a^{2}+b^{2}}+\frac {b \ln \left (a +b \tan \left (d \,x^{2}+c \right )\right )}{a^{2}+b^{2}}}{2 d}\) | \(69\) |
norman | \(\frac {a \,x^{2}}{2 a^{2}+2 b^{2}}-\frac {b \ln \left (1+\tan ^{2}\left (d \,x^{2}+c \right )\right )}{4 d \left (a^{2}+b^{2}\right )}+\frac {b \ln \left (a +b \tan \left (d \,x^{2}+c \right )\right )}{2 d \left (a^{2}+b^{2}\right )}\) | \(73\) |
risch | \(-\frac {x^{2}}{2 \left (i b -a \right )}-\frac {i b \,x^{2}}{a^{2}+b^{2}}-\frac {i b c}{d \left (a^{2}+b^{2}\right )}+\frac {b \ln \left ({\mathrm e}^{2 i \left (d \,x^{2}+c \right )}-\frac {i b +a}{i b -a}\right )}{2 d \left (a^{2}+b^{2}\right )}\) | \(96\) |
Time = 0.25 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.23 \[ \int \frac {x}{a+b \tan \left (c+d x^2\right )} \, dx=\frac {2 \, a d x^{2} + b \log \left (\frac {b^{2} \tan \left (d x^{2} + c\right )^{2} + 2 \, a b \tan \left (d x^{2} + c\right ) + a^{2}}{\tan \left (d x^{2} + c\right )^{2} + 1}\right )}{4 \, {\left (a^{2} + b^{2}\right )} d} \]
1/4*(2*a*d*x^2 + b*log((b^2*tan(d*x^2 + c)^2 + 2*a*b*tan(d*x^2 + c) + a^2) /(tan(d*x^2 + c)^2 + 1)))/((a^2 + b^2)*d)
Result contains complex when optimal does not.
Time = 0.54 (sec) , antiderivative size = 359, normalized size of antiderivative = 6.30 \[ \int \frac {x}{a+b \tan \left (c+d x^2\right )} \, dx=\begin {cases} \frac {\tilde {\infty } x^{2}}{\tan {\left (c \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {x^{2}}{2 a} & \text {for}\: b = 0 \\\frac {i \left (\operatorname {atan}{\left (\tan {\left (c + d x^{2} \right )} \right )} + \pi \left \lfloor {\frac {c + d x^{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) \tan {\left (c + d x^{2} \right )}}{4 b d \tan {\left (c + d x^{2} \right )} - 4 i b d} + \frac {\operatorname {atan}{\left (\tan {\left (c + d x^{2} \right )} \right )} + \pi \left \lfloor {\frac {c + d x^{2} - \frac {\pi }{2}}{\pi }}\right \rfloor }{4 b d \tan {\left (c + d x^{2} \right )} - 4 i b d} + \frac {i}{4 b d \tan {\left (c + d x^{2} \right )} - 4 i b d} & \text {for}\: a = - i b \\- \frac {i \left (\operatorname {atan}{\left (\tan {\left (c + d x^{2} \right )} \right )} + \pi \left \lfloor {\frac {c + d x^{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) \tan {\left (c + d x^{2} \right )}}{4 b d \tan {\left (c + d x^{2} \right )} + 4 i b d} + \frac {\operatorname {atan}{\left (\tan {\left (c + d x^{2} \right )} \right )} + \pi \left \lfloor {\frac {c + d x^{2} - \frac {\pi }{2}}{\pi }}\right \rfloor }{4 b d \tan {\left (c + d x^{2} \right )} + 4 i b d} - \frac {i}{4 b d \tan {\left (c + d x^{2} \right )} + 4 i b d} & \text {for}\: a = i b \\\frac {x^{2}}{2 \left (a + b \tan {\left (c \right )}\right )} & \text {for}\: d = 0 \\\frac {2 a d x^{2}}{4 a^{2} d + 4 b^{2} d} + \frac {2 b \log {\left (\frac {a}{b} + \tan {\left (c + d x^{2} \right )} \right )}}{4 a^{2} d + 4 b^{2} d} - \frac {b \log {\left (\tan ^{2}{\left (c + d x^{2} \right )} + 1 \right )}}{4 a^{2} d + 4 b^{2} d} & \text {otherwise} \end {cases} \]
Piecewise((zoo*x**2/tan(c), Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (x**2/(2*a), Eq(b, 0)), (I*(atan(tan(c + d*x**2)) + pi*floor((c + d*x**2 - pi/2)/pi))*t an(c + d*x**2)/(4*b*d*tan(c + d*x**2) - 4*I*b*d) + (atan(tan(c + d*x**2)) + pi*floor((c + d*x**2 - pi/2)/pi))/(4*b*d*tan(c + d*x**2) - 4*I*b*d) + I/ (4*b*d*tan(c + d*x**2) - 4*I*b*d), Eq(a, -I*b)), (-I*(atan(tan(c + d*x**2) ) + pi*floor((c + d*x**2 - pi/2)/pi))*tan(c + d*x**2)/(4*b*d*tan(c + d*x** 2) + 4*I*b*d) + (atan(tan(c + d*x**2)) + pi*floor((c + d*x**2 - pi/2)/pi)) /(4*b*d*tan(c + d*x**2) + 4*I*b*d) - I/(4*b*d*tan(c + d*x**2) + 4*I*b*d), Eq(a, I*b)), (x**2/(2*(a + b*tan(c))), Eq(d, 0)), (2*a*d*x**2/(4*a**2*d + 4*b**2*d) + 2*b*log(a/b + tan(c + d*x**2))/(4*a**2*d + 4*b**2*d) - b*log(t an(c + d*x**2)**2 + 1)/(4*a**2*d + 4*b**2*d), True))
Leaf count of result is larger than twice the leaf count of optimal. 143 vs. \(2 (53) = 106\).
Time = 0.30 (sec) , antiderivative size = 143, normalized size of antiderivative = 2.51 \[ \int \frac {x}{a+b \tan \left (c+d x^2\right )} \, dx=\frac {2 \, a d x^{2} + b \log \left (\frac {{\left (a^{2} + b^{2}\right )} \cos \left (2 \, d x^{2} + 2 \, c\right )^{2} + 4 \, a b \sin \left (2 \, d x^{2} + 2 \, c\right ) + {\left (a^{2} + b^{2}\right )} \sin \left (2 \, d x^{2} + 2 \, c\right )^{2} + a^{2} + b^{2} + 2 \, {\left (a^{2} - b^{2}\right )} \cos \left (2 \, d x^{2} + 2 \, c\right )}{{\left (a^{2} + b^{2}\right )} \cos \left (2 \, c\right )^{2} + {\left (a^{2} + b^{2}\right )} \sin \left (2 \, c\right )^{2}}\right )}{4 \, {\left (a^{2} + b^{2}\right )} d} \]
1/4*(2*a*d*x^2 + b*log(((a^2 + b^2)*cos(2*d*x^2 + 2*c)^2 + 4*a*b*sin(2*d*x ^2 + 2*c) + (a^2 + b^2)*sin(2*d*x^2 + 2*c)^2 + a^2 + b^2 + 2*(a^2 - b^2)*c os(2*d*x^2 + 2*c))/((a^2 + b^2)*cos(2*c)^2 + (a^2 + b^2)*sin(2*c)^2)))/((a ^2 + b^2)*d)
Time = 0.30 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.51 \[ \int \frac {x}{a+b \tan \left (c+d x^2\right )} \, dx=\frac {b^{2} \log \left ({\left | b \tan \left (d x^{2} + c\right ) + a \right |}\right )}{2 \, {\left (a^{2} b d + b^{3} d\right )}} + \frac {{\left (d x^{2} + c\right )} a}{2 \, {\left (a^{2} d + b^{2} d\right )}} - \frac {b \log \left (\tan \left (d x^{2} + c\right )^{2} + 1\right )}{4 \, {\left (a^{2} d + b^{2} d\right )}} \]
1/2*b^2*log(abs(b*tan(d*x^2 + c) + a))/(a^2*b*d + b^3*d) + 1/2*(d*x^2 + c) *a/(a^2*d + b^2*d) - 1/4*b*log(tan(d*x^2 + c)^2 + 1)/(a^2*d + b^2*d)
Time = 3.54 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.14 \[ \int \frac {x}{a+b \tan \left (c+d x^2\right )} \, dx=\frac {\frac {b\,\ln \left (a+b\,\mathrm {tan}\left (d\,x^2+c\right )\right )}{2}-\frac {b\,\ln \left ({\mathrm {tan}\left (d\,x^2+c\right )}^2+1\right )}{4}}{d\,\left (a^2+b^2\right )}+\frac {a\,x^2}{2\,\left (a^2+b^2\right )} \]